package Demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 34255
 * Date: 2024-06-04
 * Time: 17:14
 */
public class MyArray<I,T> {
    private Object[] array = new Object[10];
    private I value;
    public T getArray(int pos) {
        return (T)array[pos];
    }

    public I getValue() {
        return value;
    }

    public void setValue(I value) {
        this.value = value;
    }

    public void setArray(int pos, T array) {
        this.array[pos] = array;
    }

    public static void main(String[] args) {
        MyArray<Character,Integer> myArray = new MyArray<>();
        myArray.setValue('0');
        System.out.println(myArray.getValue());
        myArray.setArray(0,1);
        System.out.println(myArray.getArray(0));
    }
}
